﻿


using System;
using System.ComponentModel;
using System.Linq;

namespace ModelDinhMuc.Model
{
    
    
    
    
    /// <summary>
    /// A class which represents the Users table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.User 
    /// </summary>

	public partial class User: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public User(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnUserIdChanging(string value);
        partial void OnUserIdChanged();
		
		private string _UserId;
		public string UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnPasswordChanging(string value);
        partial void OnPasswordChanged();
		
		private string _Password;
		public string Password { 
		    get{
		        return _Password;
		    } 
		    set{
		        this.OnPasswordChanging(value);
                this.SendPropertyChanging();
                this._Password = value;
                this.SendPropertyChanged("Password");
                this.OnPasswordChanged();
		    }
		}
		
        partial void OnEmailChanging(string value);
        partial void OnEmailChanged();
		
		private string _Email;
		public string Email { 
		    get{
		        return _Email;
		    } 
		    set{
		        this.OnEmailChanging(value);
                this.SendPropertyChanging();
                this._Email = value;
                this.SendPropertyChanged("Email");
                this.OnEmailChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the Catalog table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.Catalog 
    /// </summary>

	public partial class Catalog: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Catalog(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnidChanging(long value);
        partial void OnidChanged();
		
		private long _id;
		public long id { 
		    get{
		        return _id;
		    } 
		    set{
		        this.OnidChanging(value);
                this.SendPropertyChanging();
                this._id = value;
                this.SendPropertyChanged("id");
                this.OnidChanged();
		    }
		}
		
        partial void OnParentIDChanging(long? value);
        partial void OnParentIDChanged();
		
		private long? _ParentID;
		public long? ParentID { 
		    get{
		        return _ParentID;
		    } 
		    set{
		        this.OnParentIDChanging(value);
                this.SendPropertyChanging();
                this._ParentID = value;
                this.SendPropertyChanged("ParentID");
                this.OnParentIDChanged();
		    }
		}
		
        partial void OnMaCatalogChanging(string value);
        partial void OnMaCatalogChanged();
		
		private string _MaCatalog;
		public string MaCatalog { 
		    get{
		        return _MaCatalog;
		    } 
		    set{
		        this.OnMaCatalogChanging(value);
                this.SendPropertyChanging();
                this._MaCatalog = value;
                this.SendPropertyChanged("MaCatalog");
                this.OnMaCatalogChanged();
		    }
		}
		
        partial void OnTenCatalogChanging(string value);
        partial void OnTenCatalogChanged();
		
		private string _TenCatalog;
		public string TenCatalog { 
		    get{
		        return _TenCatalog;
		    } 
		    set{
		        this.OnTenCatalogChanging(value);
                this.SendPropertyChanging();
                this._TenCatalog = value;
                this.SendPropertyChanged("TenCatalog");
                this.OnTenCatalogChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<DungCu> DungCus
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.DungCus
                       where items.IDCataLog == _id
                       select items;
            }
        }

        public IQueryable<DungCuPhucVuChuyenBay> DungCuPhucVuChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.DungCuPhucVuChuyenBays
                       where items.IDCatalog == _id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the sysdiagrams table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.sysdiagram 
    /// </summary>

	public partial class sysdiagram: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public sysdiagram(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnnameChanging(string value);
        partial void OnnameChanged();
		
		private string _name;
		public string name { 
		    get{
		        return _name;
		    } 
		    set{
		        this.OnnameChanging(value);
                this.SendPropertyChanging();
                this._name = value;
                this.SendPropertyChanged("name");
                this.OnnameChanged();
		    }
		}
		
        partial void Onprincipal_idChanging(int value);
        partial void Onprincipal_idChanged();
		
		private int _principal_id;
		public int principal_id { 
		    get{
		        return _principal_id;
		    } 
		    set{
		        this.Onprincipal_idChanging(value);
                this.SendPropertyChanging();
                this._principal_id = value;
                this.SendPropertyChanged("principal_id");
                this.Onprincipal_idChanged();
		    }
		}
		
        partial void Ondiagram_idChanging(int value);
        partial void Ondiagram_idChanged();
		
		private int _diagram_id;
		public int diagram_id { 
		    get{
		        return _diagram_id;
		    } 
		    set{
		        this.Ondiagram_idChanging(value);
                this.SendPropertyChanging();
                this._diagram_id = value;
                this.SendPropertyChanged("diagram_id");
                this.Ondiagram_idChanged();
		    }
		}
		
        partial void OnversionChanging(int? value);
        partial void OnversionChanged();
		
		private int? _version;
		public int? version { 
		    get{
		        return _version;
		    } 
		    set{
		        this.OnversionChanging(value);
                this.SendPropertyChanging();
                this._version = value;
                this.SendPropertyChanged("version");
                this.OnversionChanged();
		    }
		}
		
        partial void OndefinitionChanging(byte[] value);
        partial void OndefinitionChanged();
		
		private byte[] _definition;
		public byte[] definition { 
		    get{
		        return _definition;
		    } 
		    set{
		        this.OndefinitionChanging(value);
                this.SendPropertyChanging();
                this._definition = value;
                this.SendPropertyChanged("definition");
                this.OndefinitionChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the DungCu table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.DungCu 
    /// </summary>

	public partial class DungCu: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public DungCu(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIDChanging(long value);
        partial void OnIDChanged();
		
		private long _ID;
		public long ID { 
		    get{
		        return _ID;
		    } 
		    set{
		        this.OnIDChanging(value);
                this.SendPropertyChanging();
                this._ID = value;
                this.SendPropertyChanged("ID");
                this.OnIDChanged();
		    }
		}
		
        partial void OnIDCataLogChanging(long? value);
        partial void OnIDCataLogChanged();
		
		private long? _IDCataLog;
		public long? IDCataLog { 
		    get{
		        return _IDCataLog;
		    } 
		    set{
		        this.OnIDCataLogChanging(value);
                this.SendPropertyChanging();
                this._IDCataLog = value;
                this.SendPropertyChanged("IDCataLog");
                this.OnIDCataLogChanged();
		    }
		}
		
        partial void OnMaDungCuChanging(string value);
        partial void OnMaDungCuChanged();
		
		private string _MaDungCu;
		public string MaDungCu { 
		    get{
		        return _MaDungCu;
		    } 
		    set{
		        this.OnMaDungCuChanging(value);
                this.SendPropertyChanging();
                this._MaDungCu = value;
                this.SendPropertyChanged("MaDungCu");
                this.OnMaDungCuChanged();
		    }
		}
		
        partial void OnTenDungCuChanging(string value);
        partial void OnTenDungCuChanged();
		
		private string _TenDungCu;
		public string TenDungCu { 
		    get{
		        return _TenDungCu;
		    } 
		    set{
		        this.OnTenDungCuChanging(value);
                this.SendPropertyChanging();
                this._TenDungCu = value;
                this.SendPropertyChanged("TenDungCu");
                this.OnTenDungCuChanged();
		    }
		}
		
        partial void OnDonViChanging(string value);
        partial void OnDonViChanged();
		
		private string _DonVi;
		public string DonVi { 
		    get{
		        return _DonVi;
		    } 
		    set{
		        this.OnDonViChanging(value);
                this.SendPropertyChanging();
                this._DonVi = value;
                this.SendPropertyChanged("DonVi");
                this.OnDonViChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Catalog> Catalogs
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.Catalogs
                       where items.id == _IDCataLog
                       select items;
            }
        }

        public IQueryable<ChiTietDungCuPhucVuChuyenBay> ChiTietDungCuPhucVuChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.ChiTietDungCuPhucVuChuyenBays
                       where items.IDDungCu == _ID
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the DungCuPhucVuChuyenBay table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.DungCuPhucVuChuyenBay 
    /// </summary>

	public partial class DungCuPhucVuChuyenBay: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public DungCuPhucVuChuyenBay(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIDChanging(long value);
        partial void OnIDChanged();
		
		private long _ID;
		public long ID { 
		    get{
		        return _ID;
		    } 
		    set{
		        this.OnIDChanging(value);
                this.SendPropertyChanging();
                this._ID = value;
                this.SendPropertyChanged("ID");
                this.OnIDChanged();
		    }
		}
		
        partial void OnTenPhieuDungCuChanging(string value);
        partial void OnTenPhieuDungCuChanged();
		
		private string _TenPhieuDungCu;
		public string TenPhieuDungCu { 
		    get{
		        return _TenPhieuDungCu;
		    } 
		    set{
		        this.OnTenPhieuDungCuChanging(value);
                this.SendPropertyChanging();
                this._TenPhieuDungCu = value;
                this.SendPropertyChanged("TenPhieuDungCu");
                this.OnTenPhieuDungCuChanged();
		    }
		}
		
        partial void OnIDChuyenBayChanging(long value);
        partial void OnIDChuyenBayChanged();
		
		private long _IDChuyenBay;
		public long IDChuyenBay { 
		    get{
		        return _IDChuyenBay;
		    } 
		    set{
		        this.OnIDChuyenBayChanging(value);
                this.SendPropertyChanging();
                this._IDChuyenBay = value;
                this.SendPropertyChanged("IDChuyenBay");
                this.OnIDChuyenBayChanged();
		    }
		}
		
        partial void OnIDCatalogChanging(long? value);
        partial void OnIDCatalogChanged();
		
		private long? _IDCatalog;
		public long? IDCatalog { 
		    get{
		        return _IDCatalog;
		    } 
		    set{
		        this.OnIDCatalogChanging(value);
                this.SendPropertyChanging();
                this._IDCatalog = value;
                this.SendPropertyChanged("IDCatalog");
                this.OnIDCatalogChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Catalog> Catalogs
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.Catalogs
                       where items.id == _IDCatalog
                       select items;
            }
        }

        public IQueryable<ChuyenBay> ChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.ChuyenBays
                       where items.ID == _IDChuyenBay
                       select items;
            }
        }

        public IQueryable<ChiTietDungCuPhucVuChuyenBay> ChiTietDungCuPhucVuChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.ChiTietDungCuPhucVuChuyenBays
                       where items.IDDungCuPhucVuChuyenBay == _ID
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the ChiTietDungCuPhucVuChuyenBay table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.ChiTietDungCuPhucVuChuyenBay 
    /// </summary>

	public partial class ChiTietDungCuPhucVuChuyenBay: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public ChiTietDungCuPhucVuChuyenBay(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIDDungCuPhucVuChuyenBayChanging(long value);
        partial void OnIDDungCuPhucVuChuyenBayChanged();
		
		private long _IDDungCuPhucVuChuyenBay;
		public long IDDungCuPhucVuChuyenBay { 
		    get{
		        return _IDDungCuPhucVuChuyenBay;
		    } 
		    set{
		        this.OnIDDungCuPhucVuChuyenBayChanging(value);
                this.SendPropertyChanging();
                this._IDDungCuPhucVuChuyenBay = value;
                this.SendPropertyChanged("IDDungCuPhucVuChuyenBay");
                this.OnIDDungCuPhucVuChuyenBayChanged();
		    }
		}
		
        partial void OnIDDungCuChanging(long value);
        partial void OnIDDungCuChanged();
		
		private long _IDDungCu;
		public long IDDungCu { 
		    get{
		        return _IDDungCu;
		    } 
		    set{
		        this.OnIDDungCuChanging(value);
                this.SendPropertyChanging();
                this._IDDungCu = value;
                this.SendPropertyChanged("IDDungCu");
                this.OnIDDungCuChanged();
		    }
		}
		
        partial void OnSLCapChoKhachVipChanging(double value);
        partial void OnSLCapChoKhachVipChanged();
		
		private double _SLCapChoKhachVip;
		public double SLCapChoKhachVip { 
		    get{
		        return _SLCapChoKhachVip;
		    } 
		    set{
		        this.OnSLCapChoKhachVipChanging(value);
                this.SendPropertyChanging();
                this._SLCapChoKhachVip = value;
                this.SendPropertyChanged("SLCapChoKhachVip");
                this.OnSLCapChoKhachVipChanged();
		    }
		}
		
        partial void OnSLCapChoKhachThuongChanging(double value);
        partial void OnSLCapChoKhachThuongChanged();
		
		private double _SLCapChoKhachThuong;
		public double SLCapChoKhachThuong { 
		    get{
		        return _SLCapChoKhachThuong;
		    } 
		    set{
		        this.OnSLCapChoKhachThuongChanging(value);
                this.SendPropertyChanging();
                this._SLCapChoKhachThuong = value;
                this.SendPropertyChanged("SLCapChoKhachThuong");
                this.OnSLCapChoKhachThuongChanged();
		    }
		}
		
        partial void OnSLCapChoPhiCongChanging(double value);
        partial void OnSLCapChoPhiCongChanged();
		
		private double _SLCapChoPhiCong;
		public double SLCapChoPhiCong { 
		    get{
		        return _SLCapChoPhiCong;
		    } 
		    set{
		        this.OnSLCapChoPhiCongChanging(value);
                this.SendPropertyChanging();
                this._SLCapChoPhiCong = value;
                this.SendPropertyChanged("SLCapChoPhiCong");
                this.OnSLCapChoPhiCongChanged();
		    }
		}
		
        partial void OnSLCapChoTiepVienChanging(double value);
        partial void OnSLCapChoTiepVienChanged();
		
		private double _SLCapChoTiepVien;
		public double SLCapChoTiepVien { 
		    get{
		        return _SLCapChoTiepVien;
		    } 
		    set{
		        this.OnSLCapChoTiepVienChanging(value);
                this.SendPropertyChanging();
                this._SLCapChoTiepVien = value;
                this.SendPropertyChanged("SLCapChoTiepVien");
                this.OnSLCapChoTiepVienChanged();
		    }
		}
		
        partial void OnCoDinhChanging(bool? value);
        partial void OnCoDinhChanged();
		
		private bool? _CoDinh;
		public bool? CoDinh { 
		    get{
		        return _CoDinh;
		    } 
		    set{
		        this.OnCoDinhChanging(value);
                this.SendPropertyChanging();
                this._CoDinh = value;
                this.SendPropertyChanged("CoDinh");
                this.OnCoDinhChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<DungCuPhucVuChuyenBay> DungCuPhucVuChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.DungCuPhucVuChuyenBays
                       where items.ID == _IDDungCuPhucVuChuyenBay
                       select items;
            }
        }

        public IQueryable<DungCu> DungCus
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.DungCus
                       where items.ID == _IDDungCu
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    
    /// <summary>
    /// A class which represents the ChuyenBay table in the DINHMUCSANBAY Database.
    /// This class is queryable through DINHMUCSANBAYDB.ChuyenBay 
    /// </summary>

	public partial class ChuyenBay: INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public ChuyenBay(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIDChanging(long value);
        partial void OnIDChanged();
		
		private long _ID;
		public long ID { 
		    get{
		        return _ID;
		    } 
		    set{
		        this.OnIDChanging(value);
                this.SendPropertyChanging();
                this._ID = value;
                this.SendPropertyChanged("ID");
                this.OnIDChanged();
		    }
		}
		
        partial void OnMaMBChanging(string value);
        partial void OnMaMBChanged();
		
		private string _MaMB;
		public string MaMB { 
		    get{
		        return _MaMB;
		    } 
		    set{
		        this.OnMaMBChanging(value);
                this.SendPropertyChanging();
                this._MaMB = value;
                this.SendPropertyChanged("MaMB");
                this.OnMaMBChanged();
		    }
		}
		
        partial void OnMaBAYChanging(string value);
        partial void OnMaBAYChanged();
		
		private string _MaBAY;
		public string MaBAY { 
		    get{
		        return _MaBAY;
		    } 
		    set{
		        this.OnMaBAYChanging(value);
                this.SendPropertyChanging();
                this._MaBAY = value;
                this.SendPropertyChanged("MaBAY");
                this.OnMaBAYChanged();
		    }
		}
		
        partial void OnSoPhiCongChanging(long? value);
        partial void OnSoPhiCongChanged();
		
		private long? _SoPhiCong;
		public long? SoPhiCong { 
		    get{
		        return _SoPhiCong;
		    } 
		    set{
		        this.OnSoPhiCongChanging(value);
                this.SendPropertyChanging();
                this._SoPhiCong = value;
                this.SendPropertyChanged("SoPhiCong");
                this.OnSoPhiCongChanged();
		    }
		}
		
        partial void OnSoTiepVienChanging(long? value);
        partial void OnSoTiepVienChanged();
		
		private long? _SoTiepVien;
		public long? SoTiepVien { 
		    get{
		        return _SoTiepVien;
		    } 
		    set{
		        this.OnSoTiepVienChanging(value);
                this.SendPropertyChanging();
                this._SoTiepVien = value;
                this.SendPropertyChanged("SoTiepVien");
                this.OnSoTiepVienChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<DungCuPhucVuChuyenBay> DungCuPhucVuChuyenBays
        {
            get
            {
                  var db=new ModelDinhMuc.Model.DINHMUCSANBAYDB();
                  return from items in db.DungCuPhucVuChuyenBays
                       where items.IDChuyenBay == _ID
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
}